﻿using System;
using System.Collections.Generic;
using System.Text;
using DBA.Data.ADO;
using DBA.Data.Hibernate;

namespace DBA.Data
{
    /// <summary>
    /// 用于合并ADO和NHibernate的查询操作
    /// </summary>
    public class CommonQuery
    {
        /// <summary>
        /// ADO查询
        /// </summary>
        public static DataAccessLibrary DataAccessLibrary
        {
            get { return ADOFactory.CreateDAL(); }
        }

        public static DataAccessLibrary AdoNHibernateQuery(NHibernateQuery nhQuery)
        {
            return ADOFactory.CreateDAL(nhQuery);
        }

        /// <summary>
        /// NHibernate查询
        /// </summary>
        public static NHibernateQuery NHibernateQuery
        {
            get { return new NHibernateQuery(); }
        }
    }
}
